www.gusucode.com > Toyota Human Support Robot (HSR) Examples 程序工具箱matlab源码 > Toyota Human Support Robot (HSR) Examples/MATLAB_HSR_Examples/doc/HSRExampleMenu.m
%% Examples for the Human Support Robot (HSR) using MATLAB/Simulink % The examples were tested with MATLAB R2018a and the Toyota HSR repository with ROS Kinetic % and Gazebo. %% System Requirements % * MATLAB(R) R2018a % * Robotics System Toolbox(TM) % * Image Processing Toolbox(TM)(Optional) % * Computer Vision System Toolbox(TM)(Optional) % * HSR SDK rev. 2018.5.28 from Toyota (Tested with ROS Kinetic Kame) %% Setup the Environment % * <matlab:open('HSRSetup.html'); Setup HSR development environment> %% Launch Gazebo when using 'sim_mode' % Launch HSR simulator using the following command on the development machine: % % $ roslaunch hsrb_gazebo_launch hsrb_megaweb2015_no_objects_world.launch %% Connect to a ROS Master in the HSR % You can use the rosinit command to connect to a ROS master in the HSR(for % example running on an actual robot or a simulator). % % PC_IP ='172.29.20.201'; % HSR_IP='172.29.20.198'; % setenv('ROS_MASTER_URI',['http://' HSR_IP ':11311']) % setenv('ROS_IP',HSR_IP) % rosinit(HSR_IP,'NodeHost',PC_IP); %% Moving the Arm % * <matlab:open('armControl_topic'); Control using ROS topic> % * <matlab:open('armControl_actionlib'); Control using ROS actionlib> % * <matlab:open_system('armControlSimulink.slx'); Control using ROS topic with Simulink> %% Moving the Head % * <matlab:open('headControl_topic'); Control using ROS topic> %% Moving the Gripper % * <matlab:open('gripperControl_topic'); Control using ROS topic> %% Base Control % * <matlab:open('baseControl_Twist'); Control using ROS topic (Twist)> % * <matlab:open('baseControl_JointTrajectory'); Control using ROS topic (Joint Trajectory)> % * <matlab:open('baseControl_actionlib'); Control using ROS actionlib> % * <matlab:open_system('baseControlSimulink.slx'); Control using ROS topic (Joint Trajectory) with Simulink> %% Point Cloud Data Processing % This example requires Computer Vision System Toolbox. % % * <matlab:open('pointCloudExample'); Point cloud processing> % %% Image Processing % This example requires Image Processing Toolbox. % % * <matlab:open('imageProcessing.m'); Image processing example> % %% % Copyright 2018 The MathWorks, Inc.